package receiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.nfc.Tag;

import application.UIApplication;

public abstract class DownloadFinishReceiver extends BroadcastReceiver{

	public static final String Action = UIApplication.PackageName+".Receiver.DownloadFinish";
	@Override
	public void onReceive(Context context, Intent intent) {
		if (Action.equals(intent.getAction())){
			//
			String tag = intent.getStringExtra("tag");
			String url = intent.getStringExtra("url");
			String filePath = intent.getStringExtra("filePath");
			DownloadFinish(context, intent, url, filePath,tag);
		}
	}

	/**
	 * 下载完成
	 * @param context
	 * @param intent
	 * @param url 下载url
	 * @param filePath 文件物理路径
	 * @param tag 自定义标识
	 */
	public abstract void DownloadFinish(Context context, Intent intent,String url,String filePath,String tag);

}
